import request from '@/utils/request.js'
export const userLoginServices = ({ username, password }) =>
  request.post('/user/login', { username, password })
export const userRegisterServices = ({ username, password, rePassword }) =>
  request.post('/user/register', { username, password, rePassword })
export const userGetUserService = () => request.get('/user/userInfo')
export const userUpdateService = (data) => request.put('/user/update', data)
export const userUpdateAvatarService = (avatar) => request.post('/user/avatar', { avatar: avatar })
export const useUserPasswdService = (data) => request.post('/user/passwd', data)
export const userArticleInfoServices = () => request.get('/user/article')
export const userArticleDayInfoServices = () => request.get('/user/dayInfo')
